package com.tqjc.system.core.scan.thread;

import com.tqjc.system.common.enums.TankCarNoEnum;
import com.tqjc.system.core.pipeline.util.ScanUtils;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @description: 槽车扫描异步线程
 * @Author: 86195
 * @Date: 2024/1/5 9:41
 **/
@Slf4j
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AsynTankCarScanThread extends Thread{

    private TankCarNoEnum tankCarNoEnum;

    private String spanNo;

    @Override
    public void run() {
        try {
            log.info("槽车：{}扫描异步线程开始",tankCarNoEnum.getTankName());
            ScanUtils.startAndReceiveRes(tankCarNoEnum,spanNo);
            log.info("槽车：{}扫描异步线程完成",tankCarNoEnum.getTankName());
        } catch (Exception e){
            log.error("槽车扫描异步线程运行异常",e);
        }

    }
}
